package com.game.grid;

public class Box {
	
	private Location myLocation;
	private int size;
	public boolean upBox;
	
	public Box(int x, int y, int boxSize) {  //x,y cords put in are the top left corner.
		myLocation = new Location(x, y);
		size = boxSize;
		upBox = false;
	}
	
	public void moveUp(int speed) { //function takes in the speed at which you want the boxes to move down screen
		myLocation.setY(myLocation.getY() + speed*2);
	}
	
	public int getLeftSide() {
		return myLocation.getX();
	}
	public int getRightSide() {
		return myLocation.getX() + size;
	}
	public int getTopSide() {
		return myLocation.getY();
	}
	public int getBottomSide() {
		return myLocation.getY() + size;
	}
	
	public void setY(int y) {
		myLocation.setY(y);
	}
	
	public int getBoxSize() {
		return size;
	}
	public boolean getUpBoxStatus() {
		return upBox;
	}
	public void setUpBox() {
		upBox = true;
	}
	
	public void addToX(int var) {
		myLocation.setX(myLocation.getX() + var);
	}
}
